#from google.appengine.api import users
from google.appengine.api import urlfetch
#from google.appengine.api import images
from django.http import HttpResponse

def main(request, farm, server, id, secret):
    imageUrl = "http://farm%s.static.flickr.com/%s/%s_%s_z.jpg" % (farm, server, id, secret)
    #imageUrl = "http://farm5.static.flickr.com/4080/4875958757_af96e449ae.jpg"
    photoResponse = urlfetch.fetch(imageUrl).content
    #currentPhoto = images.Image(photoResponse)
    response = HttpResponse(str(photoResponse), mimetype="image/jpg")
    return response      
    

